{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "A\n"
     ]
    }
   ],
   "source": [
    "score=int(input('请输入一个整数：'))\n",
    "degree='DCBAAF'    #[90,99]区间和100都对应A\n",
    "if score>100 or score<0:\n",
    "    print('wrong score.must between 0 and 100.')\n",
    "else:\n",
    "    index=(score-60)//10\n",
    "    if index>=0:     #这里对应60分以上的成绩\n",
    "        print(degree[index])\n",
    "    else:\n",
    "        print(degree[-1])      #60分以下，对应F"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "7\n",
      "14\n",
      "21\n",
      "28\n",
      "42\n",
      "49\n",
      "56\n",
      "63\n",
      "77\n",
      "84\n",
      "91\n",
      "98\n"
     ]
    }
   ],
   "source": [
    "for i in range(1,101):\n",
    "    if i%7==0 and i%5!=0:\n",
    "        print(i)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1*1=1\n",
      "2*1=22*2=4\n",
      "3*1=33*2=63*3=9\n",
      "4*1=44*2=84*3=124*4=16\n",
      "5*1=55*2=105*3=155*4=205*5=25\n",
      "6*1=66*2=126*3=186*4=246*5=306*6=36\n",
      "7*1=77*2=147*3=217*4=287*5=357*6=427*7=49\n",
      "8*1=88*2=168*3=248*4=328*5=408*6=488*7=568*8=64\n",
      "9*1=99*2=189*3=279*4=369*5=459*6=549*7=639*8=729*9=81\n"
     ]
    }
   ],
   "source": [
    "for i in range(1,10):\n",
    "    for j in range(1,i+1):\n",
    "        print('{0}*{1}={2}'.format(i,j,i*j),end='')\n",
    "    print()       #打印空行"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
